<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>EPK.</title>
</head>
<script type="text/javascript"> 
		function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
</script>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" background="images/thinbarbkg.jpg">
<table cellspacing="0" cellpadding="0" border="0" height="66" width="100%">
  <tr valign="top"> 
    <td width="796" height="2"><img src="images/topbar.jpg" width="409" height="138"><img src="images/topbar1.jpg" width="353" height="138"><br>
      <img src="images/bottombar.jpg" width="762" height="52"></td>
  </tr>
</table>
<table cellspacing="0" cellpadding="0" border="0" height="208" width="751">
  <tr> 
    <td width="238" height="2" valign="top"> 
      <div align="left"><img src="images/breaker.jpg" width="238" height="38"><br>
        <img src="images/breaker1_hutsa.jpg" width="238" height="31"><br></div>
    </td>
    <td width="495" height="2" valign="top" align="left"> 
    
		<? 	$pasa_bai=false;
			$bat=$_COOKIE["bat"];
			$bi=$_COOKIE["bi"];
			if (!$konexioa=mysql_connect('localhost')) {
   				die('Ez da konektatu : ' . mysql_error());
			}// if konexioa
			if (!mysql_select_db("users")){
   				die("Ez da datu-basea existitzen - oO!");
			}//if select_db
			$sql_gald="SELECT * FROM erabiltzaileak WHERE izena='$bat' && pasahitza='$bi'";
			$pito= mysql_query($sql_gald) or die(mysql_error());
			if ($kaka=mysql_fetch_array($pito))
			{//emaitza dau
				$pasa_bai=true;
			}
		
      	if(!$pasa_bai){?>
             <p><br /><p>
      <b>Ez daukazu baimenik atal honetan egoteko.</b>
      <div align="center"><a href="javascript:history.back()" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('itzuli2','','images/itzuli2.jpg',1)"><img src="images/itzuli1.jpg" name="itzuli2" border="0" id="itzuli2" /></a></div>
		<? 
		}else{ 

		
		$izena=$_POST["identa"];
		
		$sql_ezabatu_logeoa="DELETE FROM logeoa WHERE izena='$izena'";
		$sql_ezabatu_kirolaria="DELETE FROM kirolari WHERE izena='$izena'";
		
?>
      <div align="left"> 
        <p>
		
		<?php
			if (mysql_query ($sql_ezabatu_logeoa))
			{	if (mysql_query($sql_ezabatu_kirolaria)) {
					?> <div align="center"> <?
					echo "<h3>'$izena' bezeroa ezabatuta.</h3>"; ?> 
					<a href="admin.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('itzuli2','','images/itzuli2.jpg',1)"><img src="images/itzuli1.jpg" name="itzuli2" border="0" id="itzuli2" /></a></div><?
					}
			}
			else	
			{
			?> <div align="center"> <?
			echo "<h3>Ezin izan da bezeroa ezabatu.</h3>";
			?> <div align="center"><a href="index" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('itzuli2','','images/itzuli2.jpg',1)"><img src="images/itzuli1.jpg" name="itzuli2" border="0" id="itzuli2" /></a></div></div> 
			<?
			}
		

	mysql_close($konexioa);
}//else konexioa
?></p>
      </div>
    <td width="18" height="2" valign="top" align="left">&nbsp; </td>
  </tr>
</table>

</body>
</html>